<template>
  <div>
    {{count}}
    {{countAlias}}
  </div>
</template>

<script>
import { mapState } from 'vuex'
import axios from 'axios'

axios.interceptors.request.use((value) => {
  value.headers.token = 'token'
  return value
}, (error) => {
  console.log('error', error)
})

axios.get('/').then((data) => {
  console.log('data', data)
})

export default {
  'mounted' () {
    this.$store.dispatch('increment')
  },
  'computed': {
    'otherComputedData' () {
      return 'otherComputedData'
    },
    ...mapState({
      'count': (state) => {
        return state.count
      },
      'countAlias': 'count',
    }),
  },
}
</script>

<style>

</style>

